@import '../../styles/common.less';
@import '../../styles/mixins/listbox.less';
@import '../../styles/mixins/combobox.less';
@import '../../Highlight/styles/index.less';
@import './search.less';

// CascadeTree
// ----------------------

.rs-cascade-tree {
  .rs-highlight-mark {
    padding: 0;
  }
}

// Menu Items
.rs-cascade-tree-items {
  padding: @border-radius 0;
  display: flex;

  ul,
  li {
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: @font-size-base;
  }
}

// Column
.rs-cascade-tree-column {
  overflow-y: auto;

  &-loading {
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;

    .rs-icon {
      margin: 4px;
    }
  }
}

// Tree item
.rs-cascade-tree-item {
  .listbox-option();

  @padding-right: (16px + @picker-item-content-padding-horizontal);

  position: relative;
  padding: @picker-item-content-padding-vertical @padding-right
    @picker-item-content-padding-vertical @picker-item-content-padding-horizontal;
  word-break: break-word;

  // Has children
  &s-has-children & {
    padding-right: @dropdown-toggle-padding-right;
  }

  &:hover,
  &:focus,
  &&-focus {
    .listbox-option-active();
  }

  &&-active {
    .listbox-option-selected();

    .rs-cascade-tree-caret {
      color: var(--rs-text-primary);
    }
  }

  &:disabled,
  &&-disabled {
    .listbox-options-disabled();
  }
}

.rs-cascade-tree-caret {
  .combobox-indicator-icon();
}
